<!-- 核心文化 -->
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>


<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
String mid=request.getParameter("mid");
%>
<script type="text/javascript" src="<%=path %>/js/management.js"></script>
<<script type="text/javascript">
var mid = '<%=mid%>';
var path='<%=path%>';
//加载数据
$(document).ready(
		function() {
			
			$.ajax({
				type : "post",
				url : "neirongAction.do",
				dataType : "json",
				data : {
					"menuVO.mid":mid,
					"menuVO.mlng":'cn',
					"menuVO.isdel":'0'
				},
				
				success : function(data) {	
					
					var documentList = data.documentVOList;
					alert(documentList);
					var html = '';
					
				
					//循环遍历内容
					for (var i = 0; i < documentList.length; i++) {
						
					/* $(".neirong").append('<div class="ryzz"><div class="bt"><label>内容：<textarea rows="3" cols="80" class="content" id="content1">'+documentList[i].content+'</textarea></label><button class="tadd">增加</button><button class="del1">删除</button></div></div>'); */					
					html+=('<div class="ryzz"><div class="bt"><label>内容：<textarea rows="3" cols="80" class="content">'+documentList[i].content+'</textarea></label><button class="del1">删除</button></div></div>');					
					}
					$(".neirong").append(html);
					alert($(".neirong").html());
					
					
					//页面增加内容项
					var a = $(".ryzz:first .content").val();
					$(".ryzz:first .content").val("");
					var content = $(".ryzz:first").html();
					$(".ryzz:first .content").val(a);
					
					$(".add").click(function() {
						
						$(".neirong").append(content);

						$(".del1").click(function() {
							$(this).parent().remove();
						});
					});
					
					//页面内容删除
					 $(".del1").click(function() {
							$(this).parent().remove();
						});
		
				}
			});
});

</script>
<button  id="savecpfamodel1" class="savemodel1" onclick="savemodel1()">保存</button>
<div class="neirong">


	<button class="add">新增</button><button class="save">保存</button>
	<div>
		<label>标题：</label><input type="text"/>
		<label>内容：</label><input type="text"/>
		<button class="del">删除</button>
		
	</div>
	
	
</div>


